//
// Created by admin on 2023-6-18.
//

#include "lambda_calculus.h"
#include <iostream>
#include <string>

/// operator ""s
using namespace std::string_literals;

auto lambda_calculus(auto f) {
    return [=](auto x) { return [=](auto y) { return f(x, y); }; };
}

int main() {
    auto v = lambda_calculus([](auto x, auto y){ return x + y; });
    std::cout << v(11)(22) << "\n"
            << v(1.2)(2)
            << std::string("\nHello") + " " + std::string("world"); // 33

    // operator""s
    std::cout << v("\nString"s)(" Literals\n"s);
                         return 0;
}
